<%--

  Licensed under the GNU LESSER GENERAL PUBLIC LICENSE, version 2.1, dated February 1999.

  This program is free software; you can redistribute it and/or modify
  it under the terms of the latest version of the GNU Lesser General
  Public License as published by the Free Software Foundation;

  This program is distributed in the hope that it will be useful,
  but WITHOUT ANY WARRANTY; without even the implied warranty of
  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
  GNU Lesser General Public License for more details.

  You should have received a copy of the GNU Lesser General Public License
  along with this program (LICENSE.txt); if not, write to the Free Software
  Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA  02111-1307, USA.

--%>
<%@ page errorPage="/WEB-INF/jsp/error.jsp"
    contentType="text/html; charset=utf-8"
%>
<%@ page pageEncoding="utf-8"%> 
<%request.setCharacterEncoding("utf-8");%> 
<%
     String server = request.getServerName();
     int port = request.getServerPort();
     String hostport = "http://"+server+":"+port;
     String topicId = (String)request.getAttribute("topic_id");
     String userId = (String)request.getAttribute("userId");
     String auditStatus = (String)request.getAttribute("auditStatus");
     String id = (String)request.getAttribute("topicId");
     
 %>
 <script type="text/javascript">
<!--
 function creatNew(namepath,categoryId){
     //var strFeatures='top=0, left=0, toolbar=no, menubar=no, scrollbars=no, resizable=yes,location=no, status=no';
     //alert(namepath);
     var urlparam="<%=hostport%>/jamwiki/ntko/edit.jsp?namepath="+encodeURI(namepath)+"&categoryId="+categoryId; 
     //window.open(urlparam,'新建文档',strFeatures);
     openwindow(urlparam,'','','');
 }
 function publicTopic(){
     form1.action="<%=request.getContextPath()%>/en/Special:CreateTopic?actionType=public&topicId=<%=topicId%>";
     form1.submit();
 
 }
//-->
</script>
<%@ include file="page-init.jsp" %>
<%
  List list =(List) request.getAttribute("list");
%>
<%@ page import="org.jamwiki.model.*,org.jamwiki.utils.*" %>

 
     <table width="100%" border="0" cellspacing="0" cellpadding="0">
         <tr>
           <td width="0" class="word-orange" align="center"><%@ include file="navigation-menu.jsp" %></td>   
           </tr>  
      </table>
     <table width="98%" height="8" border="0" cellpadding="0" cellspacing="0">
       <tr>
         <td><%@ include file="top-menu.jsp" %></td>
       </tr>
     </table>
     <table width="98%">
	 <% for(int i=0;i<list.size();i++){ 
		 Comment comment =(Comment) list.get(i);
	 %>
	 <tr><td width="30%" align="left"><%=comment.getCommentDate()%></td><td  width="30%">评论人：<%=comment.getUserName()==null?"匿名":comment.getUserName()%></td><td  width="40%">IP：<%=comment.getIpAddress()%></td></tr>
	 <tr><td colspan="3" align="left"><%=comment.getCommentInfo()%></td></tr>
	 <%} %>
	 <tr><td colspan="3">
	 <fieldset>
			<legend><f:message key="topic.caption.editlegend" /></legend>	
			<form name="form" method="post" name="editform" action="<jamwiki:link value="Special:Edit" />">
			
			<p>
			<textarea name="contents" rows="5" cols="200" accesskey=","></textarea>
			</p>
			<input type="hidden" name="topic" value="<c:out value="${pageInfo.topicName}"/>" />
			<input type="hidden" name="lastTopicVersionId" value="<c:out value="${lastTopicVersionId}"/>" />
			<input type="hidden" name="section" value="<c:out value="${section}"/>" />
			<input type="hidden" name="topicVersionId" value="<c:out value="${topicVersionId}"/>" />
			<input type="hidden" name="categoryId" value="<c:out value="${categoryId}"/>" />
			<input type="hidden" name="editComment" value="comment" size="60" id="editComment" />
			<input type="hidden" name="topicId" value="<%=id %>" />
			<p align="right">
			<input type="submit" name="save" value="提交评论"  accesskey="s"/>
			</p>
			</form>
			</fieldset>
	 </td></tr>
	 
	 </table>
	 
	 
 
